function [ g] = First2StepsWithStandingStill( x )
%Functions gives the probabilities where the ship will be after the very
%first two steps, if it can stand still in the firt move. 
% x contains the probability to move forwards p and to stand still s.
global n;
p=x(1);
s=x(2);

g(1)=p/(n+2); % two away
g(2)=(p+s)/(n+2); %one away
g(3)=(n+1)/(n+2)*(1-n*p-s)+s/(n+2); % same position, Startingpoint

end

